On Improving Run-time Checking in Dynamic Languages
نویسنده
چکیده
In order to detect incorrect program behaviors, a number of approaches have been proposed, which include a combination of language-level constructs (procedure-level annotations such as assertions/contracts, gradual types, etc.) and associated tools (such as static code analyzers and run-time verification frameworks). However, it is often the case that these constructs and tools are not used to their full extent in practice due to a number of limitations such as excessive runtime overhead and/or limited expressiveness. This issue is especially prominent in the context of dynamic languages without an underlying strong type system, such as Prolog. In our work we propose several practical solutions for minimizing the run-time overhead associated with assertion-based verification while keeping the correctness guarantees provided by run-time checks. We present the solutions in the context of the Ciao system, where a combination of an abstract interpretation-based static analyzer and run-time verification framework is available, although our proposals can be straightforwardly adapted to any other similar system. 1998 ACM Subject Classification D.3.3 Language Constructs and Features, D.2.4 Software/Program Verification, D.2.5 Testing and Debugging, F.3.1 Specifying and Verifying and Reasoning about Programs, F.3.3 Studies of Program Constructs, F.3.2 Semantics of Programming Languages
منابع مشابه
Type Systems of Scripting Languages
Type systems play an important role in the design of programming languages, they prevent programs from having non-correct behavior. Typically, type systems are expressed in two ways, type-checking and type inference. The type information presented on local variables and method arguments makes the difference in choosing one technique rather than the other. Type checking is a derivation type infe...
متن کاملCombining Static and Dynamic Contract Checking for Curry
Static type systems are usually not sufficient to express all requirements on function calls. Hence, contracts with preand postconditions can be used to express more complex constraints on operations. Contracts can be checked at run time to ensure that operations are only invoked with reasonable arguments and return intended results. Although such dynamic contract checking provides more reliabl...
متن کاملType Checking Higher - Order Polymorphic Multi - MethodsFran
We present a new predicative and decidable type system , called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML 21, 28], and class-based object-oriented programming and higher-order multi-methods in the tradition of CLOS 12]. Instead of using ex-tensible records as a foundation for object-oriented extensions of functional lang...
متن کاملPractical run-time checking via unobtrusive property caching
The use of annotations, referred to as assertions or contracts, to describe program properties for which run-time tests are to be generated, has become frequent in dynamic programing languages. However, the frameworks proposed to support such run-time testing generally incur high time and/or space overheads over standard program execution. We present an approach for reducing this overhead that ...
متن کاملAttaining multiple dispatch in widespread object-oriented languages
Multiple dispatch allows determining the actual method to be executed, depending on the dynamic types of its arguments. Although some programming languages provide multiple dispatch, most widespread object-oriented languages lack this feature. Therefore, different implementation techniques are commonly used to obtain multiple dispatch in these languages. We evaluate the existing approaches, pre...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2017